package com.payment.ktb.activity.main4;

import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

import com.payment.ktb.R;
import com.payment.ktb.activity.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by admin on 2017/10/17.
 */

public class PlayVideoActivity extends BaseActivity {

    @BindView(R.id.vv_playvideo)
    VideoView vv_playvideo;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_playvideo);
        ButterKnife.bind(this);
        initTitle("操作说明");
        initData();
    }


    private void initData() {

        Uri uri = Uri.parse(getIntent().getStringExtra("videoUrl"));
        vv_playvideo.setMediaController(new MediaController(mContext));
        vv_playvideo.setVideoURI(uri);
        vv_playvideo.requestFocus();
        vv_playvideo.start();
    }
}
